package com.elinkway.infinitemovies.http.parser;

import android.text.TextUtils;

import com.elinkway.infinitemovies.bean.FsTokenBean;

import org.json.JSONObject;

/**
 * Created by biandi on 2017/5/26.
 */

public class FsTokenParser extends LVideoMobileParser<FsTokenBean> {
    private String ACCESS_TOKEN = "access_token";

    @Override
    public FsTokenBean parse(JSONObject data) throws Exception {
        if (data != null) {
            String token = data.getString(ACCESS_TOKEN);
            if (!TextUtils.isEmpty(token)) {
                FsTokenBean bean = new FsTokenBean();
                bean.setToken(token);
                return bean;
            }
        }
        return null;
    }

}
